const { VITE_HIDE_HOME } = import.meta.env;
const Layout = () => import("@/layout/index.vue");

export default {
  path: "/",
  name: "Home",
  component: Layout,
  redirect: "/welcome",
  meta: {
    icon: "ep:home-filled",
    title: "首页",
    rank: 0
  },
  children: [
    {
      path: "/welcome",
      name: "Welcome",
      component: () => import("@/views/welcome/index.vue"),
      meta: {
        title: "主页",
        showLink: VITE_HIDE_HOME === "true" ? false : true
      }
    },
    {
      path: "/activity",
      name: "Activity",
      component: () => import("@/views/activity/index.vue"),
      meta: {
        title: "活动"
      }
    },
    {
      path: "/activityList",
      name: "ActivityList",
      component: () => import("@/views/activity/list.vue"),
      meta: {
        title: "活动列表"
      }
    },
    {
      path: "/activityAdd",
      name: "ActivityAdd",
      component: () => import("@/views/activity/add.vue"),
      meta: {
        title: "新增活动"
      }
    },
    {
      path: "/activityEdit",
      name: "ActivityEdit",
      component: () => import("@/views/activity/edit.vue"),
      meta: {
        title: "编辑活动"
      }
    },
    {
      path: "/submit",
      name: "Submit",
      component: () => import("@/views/submit/index.vue"),
      meta: {
        title: "投稿"
      }
    },
    {
      path: "/submitList",
      name: "SubmitList",
      component: () => import("@/views/submit/list.vue"),
      meta: {
        title: "投稿列表"
      }
    },
    {
      path: "/contact",
      name: "Contact",
      component: () => import("@/views/contact/index.vue"),
      meta: {
        title: "联络"
      }
    },
    {
      path: "/login",
      name: "Login",
      component: () => import("@/views/login/index.vue"),
      meta: {
        title: "联络"
      }
    }
  ]
} satisfies RouteConfigsTable;
